package org.deng.learn.designpattern.singleton;

/**
 * @ Author: DengLibin
 * @ Description: 单列模式二 线程不安全 懒加载
 * @ DateTime:  21:52 2018/5/7 0007
 */
public class Singleton2 {
    private static  Singleton2 instance;
    private Singleton2(){}

    public static Singleton2 getInstance(){
        if(instance == null){
            instance = new Singleton2();
        }
        return instance;
    }
}
